package com.financing.wap.service.impl;


import java.sql.SQLException;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import com.financing.wap.dto.FpFaUserSaysayCommentDTO;
import com.financing.wap.service.IFpFaUserSaysayCommentService;
import com.financing.wap.dao.IFpFaUserSaysayCommentDao;
/**
 * fp_fa_user_saysay_comment  
 * 说说评论表 业务访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("fpFaUserSaysayCommentService")
public class FpFaUserSaysayCommentServiceImpl implements IFpFaUserSaysayCommentService{

	@Autowired
	private IFpFaUserSaysayCommentDao fpFaUserSaysayCommentDao;

	@Override
	public int insert(FpFaUserSaysayCommentDTO fpFaUserSaysayComment) throws SQLException {
		return fpFaUserSaysayCommentDao.insert(fpFaUserSaysayComment);
	}

	@Override
	public void update(FpFaUserSaysayCommentDTO fpFaUserSaysayComment) throws SQLException {
		fpFaUserSaysayCommentDao.update(fpFaUserSaysayComment);
	}

	@Override
	public void updateForce(FpFaUserSaysayCommentDTO fpFaUserSaysayComment) throws SQLException {
		fpFaUserSaysayCommentDao.updateForce(fpFaUserSaysayComment);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		fpFaUserSaysayCommentDao.delete(id);
	}
	
	@Override
	public List<FpFaUserSaysayCommentDTO> queryList(FpFaUserSaysayCommentDTO fpFaUserSaysayComment) throws SQLException {
		return fpFaUserSaysayCommentDao.queryList(fpFaUserSaysayComment);
	}

	@Override
	public int queryListCount(FpFaUserSaysayCommentDTO fpFaUserSaysayComment) throws SQLException {
		return fpFaUserSaysayCommentDao.queryListCount(fpFaUserSaysayComment);
	}

	@Override
	public FpFaUserSaysayCommentDTO loadById(Integer id) throws SQLException {
		return fpFaUserSaysayCommentDao.loadById(id);
	}
 	@Override
	public FpFaUserSaysayCommentDTO queryListGetFirst(FpFaUserSaysayCommentDTO fpFaUserSaysayComment)
			throws SQLException {
		 List<FpFaUserSaysayCommentDTO> queryList = queryList(fpFaUserSaysayComment);
		 if(queryList==null||queryList.size()==0){
			 return new FpFaUserSaysayCommentDTO();
		 }
		 return queryList.get(0);
	}
}
